<?php
//function created (uses for checking all checkbox and confirm to delete selected item) which is in /js/custom_scripts.js
    echo $javascript->link('custom_scripts');
?>
<div class="z1sinhviens index">
	<h2><?php __('Z1sinhviens');?></h2>
    <p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% mẫu tin', true)
	));
	?>	</p>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
            <th><?php echo 'STT';?></th>
			<th><?php echo 'Mã số';?></th>
			<th><?php echo 'Họ tên';?></th>
			<th><?php echo 'Phái';?></th>
            <th><?php echo 'Ngày sinh';?></th>
			<th><?php echo 'Nơi sinh';?></th>
			<th><?php echo 'SĐT';?></th>
			<th><?php echo 'Email';?></th>
            <th><?php echo 'Tôn giáo';?></th>
			<th><?php echo 'Dân tộc';?></th>
			<th><?php echo 'Vào đoàn';?></th>
			<th><?php echo 'Vào đảng';?></th>
			<th><?php echo 'Trưởng thành đoàn';?></th>
			<th><?php echo 'Ngày vào chi đoàn';?></th>
			<th><?php echo 'Ngày chuyển';?></th>
            <th><?php echo 'Địa chỉ';?></th>
			<th><?php echo 'Phường/Xã';?></th>
			<th><?php echo 'Quận/Huyện';?></th>
			<th><?php echo 'Tỉnh/TP';?></th>
			<th class="actions"><?php __('Lựa chọn');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($z1sinhviens as $z1sinhvien):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
        <td><?php echo $i; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['id']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['hoten']; ?>&nbsp;</td>
        <td><?php echo $z1sinhvien['Z1sinhvien']['phai']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['ngaysinh']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['noisinh']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['sodienthoai']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['email']; ?>&nbsp;</td>
        <td>
			<?php echo $z1sinhvien['Tongiao']['tentongiao']; ?>
		</td>
		<td>
			<?php echo $z1sinhvien['Dantoc']['tendantoc']; ?>
		</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['ngayvaodoan'].' - '.$z1sinhvien['Z1sinhvien']['noivaodoan']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['ngayvaodang'].' - '.$z1sinhvien['Z1sinhvien']['noivaodang']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['truongthanhdoan']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['ngayvao']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['ngaychuyen']; ?>&nbsp;</td>
        <td><?php echo $z1sinhvien['Z1sinhvien']['diachi']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['tenphuongxa']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['tenquanhuyen']; ?>&nbsp;</td>
		<td><?php echo $z1sinhvien['Z1sinhvien']['tentinhtp']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Sửa', true), array('action' => 'edit', $z1sinhvien['Z1sinhvien']['id'])); ?>
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete', $z1sinhvien['Z1sinhvien']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $z1sinhvien['Z1sinhvien']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	
	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
    <?php echo $this->Form->end('Thêm tài khoản',true);?>
</div>
